package com.cn.tcc;

import io.seata.rm.tcc.api.BusinessActionContext;
import io.seata.rm.tcc.api.LocalTCC;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;

import java.math.BigDecimal;

@LocalTCC
public interface AccountTCCAction {
    @TwoPhaseBusinessAction(name = "AccountTCCAction")
    boolean prepare(BusinessActionContext ctx, Long userId, BigDecimal money);
    boolean commit(BusinessActionContext ctx,Long userId,BigDecimal money);
    boolean rollback(BusinessActionContext ctx,Long userId,BigDecimal money);
}
